package com.hspud.enum_.HomeWork08;

import com.hspud.HomeWork05.show;

public enum Color implements IA {
    RED(255,0,0),BLUE(0,0,255),GREEN(0,255,0),YELLOW(255,255,0),BLACK(0,255,255);
    public final int redValue;
    public final int greenValue;
    public final int blueValue;
    private Color(int redValue, int greenValue, int blueValue) {
        this.redValue = redValue;
        this.greenValue = greenValue;
        this.blueValue = blueValue;
    }

    public static void main(String[] args) {
        Color[] colors = Color.values();
        for (Color color : colors) {
            switch (color.name()) {
                case "RED":
                    System.out.println("Red");
                    break;
                case "BLUE":
                    System.out.println("Blue");
                    break;
                case "GREEN":
                    System.out.println("Green");
                    break;
                case "YELLOW":
                    System.out.println("Yellow");
                    break;
                case "BLACK":
                    System.out.println("Black");
                    break;
                default:
                    System.out.println("Invalid Color");
                    break;
            }
        }
    }
    @Override
    public void show() {
        Color[] colors = Color.values();
        for (Color color : colors) {
            System.out.println(color.name() +"  " +color);
        }
    }

    @Override
    public String toString() {
        return "{" +
                "redValue=" + redValue +
                ", greenValue=" + greenValue +
                ", blueValue=" + blueValue +
                '}';
    }
}
